//功能：输入体重与身高，计算体指数，进行体质判断（习题5.12）
//采用if-else嵌套结构实现
#include <stdio.h>

int main()
{
    double weight,height,t;
    printf("Please input weight,height:");
    scanf("%lf,%lf",&weight,&height);
    t=weight/height/height;
    printf("Body_fat_value: t = %lf\n",t);
    if(t<25)
    {
        if(t<17)
        {
            printf("Low weight\n");
        }
        else
        {
            printf("Normal weight\n");
        }
    }
    else
    {
        if(t<27)
        {
            printf("Overweight\n");
        }
        else
        {
            printf("Fat\n");
        }
    }
    return 0;
}